package com.leonzx.base.config.ureport;


import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

import javax.servlet.Servlet;

/**
 * @Author:梁亮
 * @Description:
 * @Date: 2018/6/29 13:58
 */
@ImportResource({"classpath:ureport-console-context.xml", "classpath:content.xml"})
@EnableAutoConfiguration
@Configuration
public class UReportServletImpl {

    @Bean
    public ServletRegistrationBean<Servlet> buildUreportServlet() {
        return new ServletRegistrationBean<>(new UReportServlet(), "/ureport/*");
    }
}
